package com.globallogic.vkulyk.SSHTool;

import static org.junit.Assert.*;

import org.junit.*;

public class Unit_ScriptExecutionDataKeeper extends SSHToolTester {
	private static final String PASSWORD_NOT_EQUALS = "Password not equals";
	private static final String USER_NOT_EQUALS = "User not equals";
	private static final String ACTION_TYPE_NOT_EQUALS = "Action type not equals";
	private static final String SCRIPT_FILE_NAME_NOT_EQUALS = "Script file name not equals";
	private String type = "execute_script";
	private ScriptExecutionDataKeeper scriptData = null;

	@Before
	public void setup() {
		setVarsFromPropertiesFile("testData/testing.properties");
		scriptData = new ScriptExecutionDataKeeper(type, user, password, script);
	}

	@Test
	public void shouldReturnScriptName_whenCallGetScript() {
		assertEquals(SCRIPT_FILE_NAME_NOT_EQUALS, script,
				scriptData.getScript());
	}
	
	@Test
	public void shouldReturnCorrectType_whenCallGetType() {
		assertEquals(ACTION_TYPE_NOT_EQUALS, type, scriptData.getType());
	}

	@Test
	public void shouldReturnCorrectUser_whenCallGetUser() {
		assertEquals(USER_NOT_EQUALS, user, scriptData.getUser());
	}

	@Test
	public void shouldReturnCorrectPassword_whenCallGetPassword() {
		assertEquals(PASSWORD_NOT_EQUALS, password, scriptData.getPassword());
	}

}
